package example.ble;
import android.os.SystemClock;

public class GraphThread extends Thread {

    MySurface surface;

    boolean isRun;

    public GraphThread(MySurface s){
        surface = s;
        isRun = false;    }
    public void setRun()
    {
        isRun = true;
    }
    public void setPause() {isRun = false;}
    @Override
    public void run() {
        while(isRun)
        {
            SystemClock.sleep(1000/30);
            surface.update();
        }
    }
}
